package com.example.boot_6.controller;


import com.example.boot_6.myconfig.MyResource;
import com.example.boot_6.pojo.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@Slf4j
@RestController
public class SayHelloController {

    @Autowired
    private MyResource resource ;


    @GetMapping("/hi")
    public User getUser() {
        User user = new User();
        user.setAge(1);
        user.setName("zhangsan");
        user.setDate(new Date());
        user.setDesc("It's time to show the real technology !");
        System.out.println("老铁们撸起袖子加油干...");
        System.out.println("终结版....");
        user.setPwd("123456");
        return user;
    }


    @GetMapping("/hii")
    public String say() {


        return "hi";
    }




}
